package com.tedu.pj.common.util;

import com.tedu.pj.sys.pojo.SysUser;
import org.apache.shiro.SecurityUtils;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/10/26
 */
public class ShiroUtils {
    public static String getUsername() {
        return getUser().getUsername();
    }
    /**获取登录用户*/
    public static SysUser getUser() {
        return (SysUser) SecurityUtils.getSubject().getPrincipal();
    }
}
